conf = require("../config")
if not conf.align.enabled then return {} end

return {
  'Vonr/align.nvim',
  branch = "v2",
  keys = {
    {'aa', function() require('align').align_to_char({length = 1}) end, mode = { 'x' },  desc = "Aligns to 1 character"},
    {'ad', function() require('align').align_to_char({preview = true, length = 2}) end, mode = { 'x' }, desc = "Aligns to 2 character with previews"},
    {'aw', function() require('align').align_to_string({preview = true, regex = false}) end, mode = { 'x' }, desc = "Aligns to string with previews"},
    {'ar', function() require('align').align_to_string({preview = true, regex = true}) end, mode = { 'x' }, desc = "Aligns to a Vim regex with previews"},
    -- {'glw', function()
    --   local a = require('align')
    --   a.operator(
    --   a.align_to_string,
    --   {
    --     regex = false,
    --     preview = true,
    --   }
    --   )
    -- end, mode = { 'x' }, desc = "Align a paragraph to a string with previews"},
    -- {'gla', function()
    --     local a = require'align'
    --     a.operator(a.align_to_char)
    -- end, mode = { 'x' }, desc = "Align a paragraph to 1 character"},
  }
}
